home *** CD-ROM | disk | FTP | other *** search
/ NOVA - For the NeXT Workstation / NOVA - For the NeXT Workstation.iso / Documents / NeXTAnswers / sysadmin.569 < prev    next >
Text File  |  1992-02-06  |  3KB  |  70 lines

  1. {\rtf0\ansi{\fonttbl\f0\fnil Times-Roman;\f1\fmodern Courier;}
  2. \paperw11760
  3. \paperh6540
  4. \margl120
  5. \margr120
  6. \pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\f0\b0\i0\ul0\fs28 swapfile swaptab swapspace lowat hiwat paging\
  7. \
  8. Q:  What is the size of the swapfile on the NeXT Computer?\
  9. \
  10. A:   The size of the swapfile depends on the parameters set up in the 
  11. \b /etc/swaptab
  12. \b0  configuration file and the demand for paging on the system.  The swapfile will grow on demand; the demand for swapping depends on the memory needs of the running applications, and the size of the “real” memory (the more real memory the less the demand for paging space).\
  13. \
  14. The 
  15. \b swaptab
  16. \b0  file looks like this:\
  17. \
  18.  
  19. \f1\fs24\fi-20\li540 #\
  20. #       /etc/swaptab\
  21. #\
  22. /private/vm/swapfile    lowat=20971520  # 20 Meg low water mark\
  23.  
  24. \f0\fs28\fi0\li0 \
  25. This tells the system to use the file 
  26. \b /private/vm/swapfile
  27. \b0  for swapping.  It also specifies the parameter 
  28. \b lowat=20971520
  29. \b0 , the “low water mark.”  This low water mark is the smallest size to which the file will shrink.  The paging file will then grow as needed to meet demand.\
  30. \
  31. \b hiwat=
  32. \i n
  33. \b0\i0  parameter may be used in the 
  34. \b swaptab
  35. \b0  to set a limit on how large this file will grow.\
  36. \
  37. \
  38. Q: What size will the 
  39. \b swapfile
  40. \b0  be on a new disk ?\
  41. \
  42. A: It starts out at 16MB out of the box.  It should never get smaller, since this is below the lowat mark. \
  43. \
  44. \
  45. Q: Will the 
  46. \b swapfile
  47. \b0  get smaller (if above the low water mark) while the system is running, or is it reset only upon reboot?\
  48. \
  49. A: The swapfile works in a stack-oriented manner —  it will shrink only if the system detects that all pages above a certain address are unallocated.  This rarely occurs.  Consider launching a 4MB application which is completely paged out followed by one more page owned by some other application in the system.  Even if the 4MB is freed the swapfile cannot be truncated until that extra page is freed.  What generally happens is that long-running applications allocate a few pages at the high addresses, and 
  50. \b swapfile
  51. \b0  apparently never shrinks.\
  52. \
  53. During a reboot when paging is turned on (by the invocation of 
  54. \b mach_swapon
  55. \b0 ), the 
  56. \b swapfile
  57. \b0  is immediately truncated to the minimum value.\
  58. \
  59. Note:  Despite the file being called the 
  60. \b swapfile
  61. \b0 , the NeXT operating system uses pure demand-paged memory management.   mach_swapon(8) tells the kernel to initiate paging.\
  62. \
  63. QA569                \
  64. \
  65. Valid for 1.0 \
  66. Valid for 2.0\
  67. \
  68.  
  69.